package com.zmj.dao.impl;

import com.zmj.dao.LoginDao;
import com.zmj.entity.User;
import com.zmj.utils.DBUtils;


public class LoginDaoImpl implements LoginDao {

    public User login(String userName, String password) {
       String sql="select *  from user where userName=? and password=?";
        try {
            return DBUtils.executeDQLByOne(User.class,sql,userName,password);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return  null;
    }


}
